<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>改变this指向</h2>
    <button class="btn">点我</button>
</body>
<script>
var name='小强'
var obj={
    name:'alice',
    age:20
   
}

function sayName(a,b,c) {
    console.log(a)
    console.log(b)
    console.log(c)
      console.log(this.name)
   
     
  }

 // sayName.call(obj,10,20,30)
  //sayName.apply(obj,[10,20,30])
 sayName.bind(obj,10,20,30)()




</script>
</html>